<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>HTML JavaScript</title>
</head>
<body>

<h1>我的第一段 JavaScript</h1>

<button type="button" onclick="document.getElementById('demo').innerHTML = Date()">
  点击我来显示日期和时间
</button>

<p id="demo"></p>

</body>
</html>